package com.CST.controller.cb;

import com.CST.common.api.ResultObject;
import com.CST.dto.cb.JxAssetValueDTO;
import com.CST.service.cb.JxAssetValueService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xnd
 * @since 2023-06-20
 */
@Api(tags = {"固定资产原值"})
@RestController
@RequestMapping("/jxAssetValue")
public class JxAssetValueController {
    @Autowired
    private JxAssetValueService jxAssetValueService;

    @PostMapping("/getAssetValueInfo")
    @ApiOperation("采集固定资产原值")
    public ResultObject<String> getAssetValueInfo(@RequestBody JxAssetValueDTO dto) {
        String result = jxAssetValueService.getAssetValueInfo(dto);
        if (!"success".equals(result)) {
            return ResultObject.success(result, "采集失败");
        }
        return ResultObject.success("采集成功");
    }
}
